// 联系人
import { POST } from '@/api/http';

const service = 'com.xgggh.srv.users';
const url = 'contacts';
// 联系人列表
export function contacts(body) {
  const params = {
    method: 'Contact.Search',
    service,
    request: `${JSON.stringify(body)}`,
  };
  return POST(url, params);
}

// 联系人
export function contact(body) {
  const params = {
    method: 'Contact.contact',
    service,
    request: `${JSON.stringify(body)}`,
  };
  return POST(url, params);
}

// 创建联系人
export function createContact(body) {
  const params = {
    method: 'Contact.Create',
    service,
    request: `${JSON.stringify(body)}`,
  };
  return POST(url, params);
}

export default { contacts, createContact, contact };
